<include file="Public:header" />
<div class="container main"> <include file="Public:left" />
  <div class="w790">
  <script>
  	function uploaded(path){
		$("#img_url").attr("src",'__PUBLIC__'+path);
		$("input[name='img_url']").val(path);
	}
	
	function del_img(){
		if(confirm('您确定要删除图片吗?')){
			var file=$("input[name='img_url']").val();
			$.post("{:U('delImgBypath')}",{'path':file},function(data){alert(data);
				$("input[name='img_url']").val('');
				$("#img_url").attr('src','');
			});
		}else{
			return false;
		}
	}
  </script>
   <div class="h"><a href="{:U('index')}" class="btn btn-info"><i class="glyphicon glyphicon-circle-arrow-left"></i> 返回列表</a>
 
 </div>
    <form class="checkoutform form-horizontal" action="{:U('update')}" method="post">
    <div class="table_ container">
    <input name="id" type="hidden" id="id" value="{$info.id}" />
    <div class="form-group">
      <label class="col-sm-2 control-label">显示风格</label>
      <div class="col-sm-10">
        <!-- <label class="checkbox-inline" onClick="showPagesBox(this);">
          <img src="<notempty name="info['page_list_header_img']">__PUBLIC__{$info.page_list_header_img}<else/>__PUBLIC__/Admin/images/defaultimg.png</notempty>" width="100" height="100"><br>
          [列表头部风格]<input type="hidden" name="page_list_header_id" value="{$info.page_list_header_id}"><input type="hidden" name="page_list_header_img" value="{$info.page_list_header_img}"></label>-->
         
         
         
         
         <label class="checkbox-inline" onClick="showPagesBox(this);">
         <img src="<notempty name="info['page_list_img']">{:getThumbPath($info['page_list_img'])}<else/>__PUBLIC__/Admin/images/defaultimg.png</notempty>" width="100" height="100"><br>

         [列表主体风格]<input type="hidden" name="page_list_id" value="{$info.page_list_id}">
         <input type="hidden" name="page_list_img" value="{$info.page_list_img}">
         </label>
         
         
         
          
          
          
          
          <!--<label class="checkbox-inline" onClick="showPagesBox(this);">
          <img src="<notempty name="info['page_list_footer_img']">__PUBLIC__{$info.page_list_footer_img}<else/>__PUBLIC__/Admin/images/defaultimg.png</notempty>" width="100" height="100"><br>
          [列表底部风格]<input type="hidden" name="page_list_footer_id" value="{$info.page_list_footer_id}"><input type="hidden" name="page_list_footer_img" value="{$info.page_list_footer_img}"></label>-->
          
          <!--<label class="checkbox-inline" onClick="showPagesBox(this);">
          <img src="<notempty name="info['page_view_header_img']">__PUBLIC__{$info.page_view_header_img}<else/>__PUBLIC__/Admin/images/defaultimg.png</notempty>" width="100" height="100"><br>
          [详情头部风格]<input type="hidden" name="page_view_header_id" value="{$info.page_view_header_id}"><input type="hidden" name="page_view_header_img" value="{$info.page_view_header_img}"></label>-->
          
          <label class="checkbox-inline" onClick="showPagesBox(this);">
           <img src="<notempty name="info['page_view_img']">{:getThumbPath($info['page_view_img'])}<else/>__PUBLIC__/Admin/images/defaultimg.png</notempty>" width="100" height="100"><br>
          [详情主体风格]<input type="hidden" name="page_view_id" value="{$info.page_view_id}"><input type="hidden" name="page_view_img" value="{$info.page_view_img}"></label>
          
          
          
          
          
         <!-- <label class="checkbox-inline" onClick="showPagesBox(this);">
          <img src="<notempty name="info['page_view_footer_img']">__PUBLIC__{$info.page_view_footer_img}<else/>__PUBLIC__/Admin/images/defaultimg.png</notempty>" width="100" height="100"><br>
          [详情底部风格]<input type="hidden" name="page_view_footer_id" value="{$info.page_view_footer_id}"><input type="hidden" name="page_view_footer_img" value="{$info.page_view_footer_img}"></label>-->
          
          
      </div>
   </div>
   
      
       <div class="form-group">
      <label class="col-sm-2 control-label">标题</label>
      <div class="col-sm-10">
         <input class="form-control" datatype="*" value="{$info.title}" name="title" type="text" placeholder="栏目名称">
      </div>
   </div>
   
          <div class="form-group">
      <label class="col-sm-2 control-label">访问名</label>
      <div class="col-sm-10">
         <input class="form-control" name="name" value="{$info.name}" type="text" placeholder="访问名">
      </div>
   </div>
   
 <div class="form-group">
      <label class="col-sm-2 control-label">父级</label>
      <div class="col-sm-10">
         <select class="form-control" name="pid" id="pid">
          <option value="">请选择</option>
          <volist name="pid_list" id="vo">
            <option <eq name="vo['id']" value="$info['pid']">selected="selected"</eq> value="{$vo.id}">{$vo.title}</option>
            <volist name="vo['sub']" id="svo">
               <option <eq name="svo['id']" value="$info['pid']">selected="selected"</eq> value="{$svo.id}">{:getdeepstr($svo['deep'])}{$svo.title}</option>
            </volist>
          </volist>
        </select>
      </div>
   </div>  
         
    <div class="form-group">
      <label class="col-sm-2 control-label">类型</label>
      <div class="col-sm-10">
         <select class="form-control" name="type_id" id="type_id">
          <option value="">请选择</option>
          <volist name="type_list" id="vo">
            <option <eq name="vo['id']" value="$info['type_id']">selected="selected"</eq> value="{$vo.id}">{$vo.title}</option>
          </volist>
        </select>
      </option>
      </div></div>
      
 <div class="form-group" style="display:none;">
      <label class="col-sm-2 control-label">品牌</label>
      <div class="col-sm-10">
      <volist name="brandList" id="vo">
      
         <label class="checkbox-inline"> <input <?php if(in_array($vo['id'], $info['brands'])){?>checked<?php }?> type="checkbox" name="brands[]" value="{$vo.id}" id="is_nav_2" />
          {$vo.title}</label>
           </volist>
           
           
           
          </div>
          </div>
          
          
          <div class="form-group">
      <label class="col-sm-2 control-label">谁可以查看</label>
      <div class="col-sm-10">
          
         
          <volist name="getLevelNameList" id="vo">
          
          <label class="checkbox-inline">  <input name="levelBuy" type="radio" id="is_nav_9" value="{$key}" <eq name="info['levelBuy']" value="$key">checked="checked"</eq> />
          {$vo}</label>
          
          </volist>
          
          
         
         
       
      </div>
      </div>  
          
          
       
 <div class="form-group">
      <label class="col-sm-2 control-label">图片</label>
      <div class="col-sm-10">
         <input name="img_url" type="hidden" value="{$info.img_url}" /><img onclick="showImgBox(this);" 

src="<notempty name="info['img_url']">{:getThumbPath($info['img_url'])}

<else/>__PUBLIC__/Admin/images/defaultimg.png</notempty>" id="img_url" height="40" />
      </div>
   </div>

      
      <div class="form-group">
      <label class="col-sm-2 control-label">内容</label>
      <div class="col-sm-10">
         <html:editor id="editor" name="content" type="UEDIT" style="height:400px; width:100%;">{$info.content}</html:editor>
      </div>
   </div>
       
      
       <div class="form-group">
      <label class="col-sm-2 control-label">页面标题</label>
      <div class="col-sm-10">
         <input class="form-control" value="{$info.page_title}" name="page_title" type="text" >
      </div>
   </div>
        
       <div class="form-group">
      <label class="col-sm-2 control-label">页面关键字</label>
      <div class="col-sm-10">
         <input class="form-control" value="{$info.keywords}" name="keywords" type="text" >
      </div>
   </div>
   
     <div class="form-group">
      <label class="col-sm-2 control-label">页面描述</label>
      <div class="col-sm-10">
         <textarea class="form-control" name="description" class="" cols="50" rows="6" id="description">{$info.description}</textarea>
      </div>
   </div></div>
      <div class="pages"><button type="submit" class="btn btn-success">保存</button></div>
    </form>
  </div>
  <div class="clear"></div>
</div>
<include file="Public:footer" />